import * as React from 'react';
import * as Immutable from 'seamless-immutable'

import StackView, { IStackViewItem, initStackViews, toStackViewItem, renderViewByHash } from '../../component/common/StackView'
import { WorkView, getViewByPath, getParamFromHash } from '../../config/workViews'
import WorkViewComponent, { IWorkViewProps, IWorkViewState } from '../../component/common/WorkViewComponent'

import DashboardMain from './DashboardMain'
import DashboardPart1 from './DashboardPart1'

export const RootHash = '#/dashboard';


export const RootView = {
  id: 10,
  deep: 2,
  pathRegExp: /^#\/dashboard\/?[\s\S]*?$/,
  path: '#/dashboard',
  paramPath: '#/dashboard',
  name: 'Dashboard',
  text: '主控制台',
  component: DashboardMain,
};

export const StackViewPages = [];
StackViewPages.push({
  id: 101,
  deep: 3,
  pathRegExp: /^#\/dashboard\/part1\/?[\s\S]*?$/,
  path: '#/dashboard/part1',
  paramPath: '#/dashboard/part1',
  name: 'DashboardPart1',
  text: '收支台账',
  component: DashboardPart1,
});

export default class Dashboard extends WorkViewComponent<IWorkViewProps, IWorkViewState>{

  providerPages() {
    return StackViewPages;
  }

  providerRootView() {
    return RootView;
  }

}

